package com.foreveross.bsl.mam.app.application.vo;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import com.foreveross.bsl.common.utils.bean.Constants;

/**
 * [打包请求]<BR>
 * [功能详细描述]
 * 
 * @author 冯伟立
 * @version [javatest, 2013-7-2]
 */
@XmlRootElement(name = "MampkgReq")
@XmlAccessorType(XmlAccessType.FIELD)
public class MamPackageRequestVo implements Serializable {

	/**
	 * [一句话功能简述]<BR>
	 * [功能详细描述]
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 参看com.foreveross.common.infra.utils.Constants<BR>
	 * [功能详细描述]
	 */
	private int OS = Constants.ANDROID;

	/**
	 * [一句话功能简述] 应用id <br>
	 * [功能详细描述]
	 */
	private String id;

	/**
	 * [一句话功能简述]<BR>
	 * [功能详细描述]
	 */
	private String userId;
	/**
	 * [一句话功能简述]<BR>
	 * 应用标识 [功能详细描述]
	 */
	private String appId;
	/**
	 * [一句话功能简述]<BR>
	 * 应用版本 [功能详细描述]
	 */
	private String version;
	/**
	 * [build号]<BR>
	 * 回调路径 [功能详细描述]
	 */
	private int versionCode;

	/**
	 * 版本描述
	 */
	private String desc;

	public int getVersionCode() {
		return versionCode;
	}

	public void setVersionCode(int versionCode) {
		this.versionCode = versionCode;
	}

	private String feedbackUrl;

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getFeedbackUrl() {
		return feedbackUrl;
	}

	public void setFeedbackUrl(String feedbackUrl) {
		this.feedbackUrl = feedbackUrl;
	}

	public int getOS() {
		return OS;
	}

	public void setOS(int oS) {
		OS = oS;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	/**
	 * [此次打包的标识]<BR>
	 * 1.packageSeq=userId_appId_versionCode_build_os<BR>
	 * 例如：fengweili_com.csair.station_1.1.0_20_0<BR>
	 * fengweili:userId<BR>
	 * appId:com.csair.station<BR>
	 * versionCode:1.1.0<BR>
	 * build:20<BR>
	 * os:0<BR>
	 */
	public String getPackageSeq() {
		StringBuilder packageSeqBuilder = new StringBuilder().append(userId)
				.append("_").append(OS).append("_").append(appId).append("_")
				.append(version);
		return packageSeqBuilder.toString();
	}
}
